// 组件接口
export interface ViewComponent {
  render():  string | React.ReactNode | React.ReactNode[]
}

// 容器组件
export class ViewGroup implements ViewComponent {
  private children: React.ReactNode[] = []

  addComponent(component: React.ReactNode): void {
    this.children.push(component)
  }

  render() {
    return this.children
  }
}

// export class ViewGroup implements ViewComponent {
//   private children: ViewComponent[] = []

//   addComponent(component: ViewComponent): void {
//     this.children.push(component)
//   }

//   render() {}
// }
